02Aug93  e

Attached are updates to several files for the Mac version of 
SML/NJ 93. These files add no features, fix no bugs. So why
am I sending them to you?

Compiling SML/NJ v93 with ThinkC 6.0 lead to several problems.
Most of these were solved quite easily. Almost all of the errors
are the result of ThinkC 6's stronger prototype enforcement for
Mac traps and are fixed with casts. The edited files are attached.
Below is a list of the compiler errors, as produced by ThinkC 6,
and new versions of the lines in error. <<file !930802errs.text>>

I also made a change in cfuns.c where the preprocessor condition 
(THINK_C < 5) was added as follows:

#ifdef THINK_C
#if (THINK_C < 5)
struct stat {
	int foo;
};
static int ___lstat (char *s, struct stat *buf)
	{
}
static int ____fstat (int fd,  struct stat *buf)
	{
}
#endif
#endif

I would like this to have been (THINK_C < 6), but although the 
documentation says that THINK_C is 6 in this version, the 
documentation lies. Except for this change, all of the files 
should be backward compatable with ThinkC 5. Note that the 
Symantec ANSI library now supports stat(), so it will be easier
to add several of the cfuns next time around.

I also needed to remake the ANSI-ML project. This went without incident.
I needed to placed it in a folder inside src along with an alias to the 
"Symantec C++ for the Mac" folder, but I don't recall why. If you run 
into trouble you might give this a try as well.

e

===================================================================================
File Òos_mac.cÓ; Line 341
Error:   first argument to function ÔPBHGetFInfoÕ does not match prototype
=-=
		  err = PBHGetFInfo( (HParmBlkPtr )&pb, FALSE );
===
File Òos_mac.cÓ; Line 350
Error:   first argument to function ÔPBHSetFInfoÕ does not match prototype
=-=
		    PBHSetFInfo( (HParmBlkPtr )&pb, FALSE );
===
File Òos_mac.cÓ; Line 606
Error:   argument to function ÔDisposPtrÕ does not match prototype
=-=
    { DisposPtr( (Ptr )wind_table[id].filename ); wind_table[id].filename = NULL; }
===
File Òos_mac.cÓ; Line 956
Error:   argument #5 to function ÔSFGetFileÕ does not match prototype
=-=
SFTypeList ftypes;
  SFGetFile( SFGwhere, prompt, 0L, nbtypes, ftypes, 0L, &reply );
===
File Òos_mac.cÓ; Line 1578
Error:   first argument to function ÔSetCtlValueÕ does not match prototype
=-=
  SetCtlValue( (ControlHandle )h, find_wrap );
===
File Òos_mac.cÓ; Line 1580
Error:   first argument to function ÔSetCtlValueÕ does not match prototype
=-=
  SetCtlValue( (ControlHandle )h, find_ci );
===
File Òos_mac.cÓ; Line 1592
Error:   argument to function ÔGetCtlValueÕ does not match prototype
=-=
	    find_wrap = GetCtlValue( (ControlHandle )h );
===
File Òos_mac.cÓ; Line 1594
Error:   argument to function ÔGetCtlValueÕ does not match prototype
=-=
	    find_ci   = GetCtlValue( (ControlHandle )h );
===
File Òos_mac.cÓ; Line 1658
Error:   last argument to function ÔGetItemÕ does not match prototype
=-=
      { GetItem(menus[appleM], theItem, name);
===
File Òos_mac.cÓ; Line 1659
Error:   argument to function ÔOpenDeskAccÕ does not match prototype
=-=
        OpenDeskAcc( name );
===================================================================================
File Òos_mac_console.cÓ; Line 93
Error:   argument to function ÔSelectWindowÕ does not match prototype
=-=
		SelectWindow( (WindowPtr )wp );
===
File Òos_mac_console.cÓ; Line 94
Error:   argument to function ÔShowWindowÕ does not match prototype
=-=
	ShowWindow( (WindowPtr )wp );
===================================================================================
File Òos_mac_eStyle.cÓ; Line 262
Error:   second argument to function ÔNewMenuÕ does not match prototype
=-=
  hM = NewMenu( id, "\p" );
===
File Òos_mac_eStyle.cÓ; Line 350
Error:   argument to function ÔDisposHandleÕ does not match prototype
=-=
  if( popMenu3 ) DisposHandle( (Handle )popMenu3 );
===
File Òos_mac_eStyle.cÓ; Line 359
Error:   argument to function ÔDisposHandleÕ does not match prototype
=-=
  if( popMenu4 ) DisposHandle( (Handle )popMenu4 );
===
File Òos_mac_eStyle.cÓ; Line 385
Error:   argument to function ÔDisposHandleÕ does not match prototype
=-=
    if( popMenu3 ) DisposHandle( (Handle )popMenu3 );
===
File Òos_mac_eStyle.cÓ; Line 396
Error:   argument to function ÔDisposHandleÕ does not match prototype
=-=
    if( popMenu4 ) DisposHandle( (Handle )popMenu4 );
===
File Òos_mac_eStyle.cÓ; Line 520
Error:   argument #4 to function ÔGetDItemÕ does not match prototype
=-=
  GetDItem( dbox, item, &itemtype, (Handle *)&hC, &itemrect);
===
File Òos_mac_eStyle.cÓ; Line 561
Error:   argument to function ÔDisposHandleÕ does not match prototype
=-=
  if( popMenu1 ) DisposHandle( (Handle )popMenu1 );
===
File Òos_mac_eStyle.cÓ; Line 563
Error:   argument to function ÔDisposHandleÕ does not match prototype
=-=
  if( popMenu2 ) DisposHandle( (Handle )popMenu2 );
===
File Òos_mac_eStyle.cÓ; Line 565
Error:   argument to function ÔDisposHandleÕ does not match prototype
=-=
  if( popMenu3 ) DisposHandle( (Handle )popMenu3 );
===
File Òos_mac_eStyle.cÓ; Line 567
Error:   argument to function ÔDisposHandleÕ does not match prototype
=-=
  if( popMenu4 ) DisposHandle( (Handle )popMenu4 );
===
File Òos_mac_eStyle.cÓ; Line 581
Error:   second argument to function ÔNewMenuÕ does not match prototype
=-=
  popMenu1 = NewMenu( popMenuID1, "\p" );
===
File Òos_mac_eStyle.cÓ; Line 587
Error:   second argument to function ÔNewMenuÕ does not match prototype
=-=
  popMenu2 = NewMenu( popMenuID2, "\p" );
===================================================================================
File Òos_mac_Print.cÓ; Line 103
Error:   argument to function ÔPenPatÕ does not match prototype
=-=
	PenMode(patCopy);PenSize(1,1);PenPat( (ConstPatternParam )&qd.black );
===
File Òos_mac_Print.cÓ; Line 137
Error:   argument to function ÔGetDateTimeÕ does not match prototype
=-=
	unsigned long	time;
===
File Òos_mac_Print.cÓ; Line 168
Error:   second argument to function ÔNumToStringÕ does not match prototype
=-=
			NumToString( ePrintPage, tStr );
===
File Òos_mac_Print.cÓ; Line 169
Error:   argument to function ÔDrawStringÕ does not match prototype
=-=
			DrawString( tStr );
===================================================================================
